home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / scherz programme / fortune / read_me_too < prev    next >
Text File  |  1996-04-07  |  5KB  |  136 lines

  1.                         Jim Finnis
  2.                         5 Northgate St.
  3.                         Aberystwyth
  4.                         Dyfed
  5.                         SY23 2JS
  6.                         email: white@elf.dircon.co.uk
  7.  
  8.     First, a word of abject apology for those of you who have
  9. written to me, and had to wait an utterly ridiculous amount of time for
  10. your disk - I've been moving around a lot since last year, and it's
  11. taken almost a year for some of the post sent to my old address to
  12. finally catch up with me. Some of you may have sent me a disk and NEVER
  13. heard from me.. that's because the forwarding addresses have got
  14. mangled, lost, etc.. Once again, sorry.
  15.  
  16.  
  17.     The current number of fortunes is almost 4000, mainly thanks to
  18. Grahame Fendle, who sent me about a hundred quotes of his own, and Mike
  19. Carlin of MVM Consultants, who sent me six hundred and thirty.  Grahame
  20. later followed up with another two-hundred-ish quotes.  Thanks!  I think it
  21. must be a contender for the biggest fortune program in history by now.
  22.  
  23. Here are some commonly asked questions:
  24.  
  25.  
  26. 1) How can I add to an existing fortune file?
  27.  
  28.     Phew - this is a tough one, and I'm afraid to say you can't. The
  29. reason is that the file is in several sections:
  30.  
  31.     Huffman compression table, giving the relative frequencies of all
  32.     the different characters used in the file,
  33.  
  34.     File statistics (such as the total number of fortunes),
  35.  
  36.     A table of pointers to the beginning of each fortune,
  37.  
  38.     Each fortune itself, compressed according to the compression tables
  39.     at the beginning.
  40.  
  41.     I've thought about this a lot, and it's impossible to join two
  42. compressed files together without decompressing them first, and rehashing
  43. all the compression data, and building a new, bigger jump table. In other
  44. words, the program would have to generate the original source files itself.
  45. And since you have them already, this is a bit pointless. Sorry, but using
  46. the jump table method makes it infinitely faster.
  47.  
  48.     What I normally do is keep an ASCII file called "newforts", and add
  49. new fortunes to this as they occur to me. When this is fairly large (about
  50. 100 fortunes), I add this file onto the end of the main fortune text file,
  51. and run makefort. That way, I don't run makefort every time I think of a
  52. fortune. Incidentally, makefort is faster now!
  53.  
  54.  
  55.  
  56.  
  57. 2) If I put fortune in my startup-sequence, it keeps showing the same
  58. fortune every time I boot.
  59.  
  60.     Ah, this is because you don't have a RAM expansion with a battery
  61. backed-up clock! Fortune decides which fortune to show by generating a
  62. random number. Since computers can't really do random numbers, it needs a
  63. pseudo-random source to work from. The only available one is the time -
  64. which on the Amiga is in seconds since midnight on the 1st of January 1970
  65. (Incidentally, this is when my girlfriend was born, and "Amiga" means
  66. "girlfriend" in Spanish - spooky, huh?). Of course, on machines which don't
  67. have a clock, the time is always the same whenever you switch on - it
  68. starts at 0 Since it usually takes the same time to run a startup-sequence,
  69. the clock is always the same every time it prints a fortune, so you always
  70. get the same one! It works fine when you run it any other way, because in
  71. typing the command, or clicking on it, you have a random delay.
  72.  
  73.     There's no real way around this, except by putting in some piece of
  74. user interaction to act as the random delay. You can do this by starting up
  75. fortune with the -i flag, or by putting the line
  76.  
  77.     ask "Press return for a fortune"
  78.  
  79. in the startup-sequence before the line running the fortune program.
  80.  
  81.     If you do have a battery backed-up clock, and still have this
  82. problem, make sure that fortune knows what the time is by ensuring that the
  83. "fortune" line in the startup-sequence is after the "setclock load" line,
  84. which reads the clock.
  85.  
  86.  
  87.  
  88.  
  89. 3) Did I type them all in?
  90.  
  91.     No way! The fortune file you have is from various places, where it
  92. grew over a period of many years. About half of them are from the "original"
  93. fortune file found on most UNIX mainframes and minicomputers. I extracted them
  94. from the Tardis Project machine at Edinburgh University, but only got up to
  95. those beginning with 'N' when the file transfer failed! The rest are either
  96. from the worldwide Unix News system Usenet's "rec.humor.funny" and
  97. "alt.humor.oracularities" newsgroups, or from my own personal collection
  98. of stuff. I hope you enjoy them.
  99.  
  100.  
  101.  
  102.  
  103. 4) Can I have the source?
  104.  
  105.     I would have liked to supply the source, but there isn't enough room
  106. on the disk - such is life. Besides, it's not the prettiest of programs -
  107. like most pet projects, it grew organically. It's even got a "goto" in it.
  108.  
  109.     STOP PRESS: I've changed my mind! The source is now on the disk.
  110. See fortune.notes to see what's what.
  111.  
  112.  
  113.                                 Begging Bit
  114.                                 -----------
  115.  
  116.     This is the full version of the program, with all the
  117. features below. If you send me a fiver, however, I'll be eternally
  118. grateful.. Nobody has yet, though...
  119.  
  120. Stop Press!
  121.  
  122.     The program is updated! It now has icons, which allow you to move
  123. through the file backwards and forwards, and to jump to a random fortune.
  124. There's a new flag, FLAGS=TINY, which makes the iconised form of the window
  125. just big enough to hold these icons. In addition, the program has a built
  126. in clock, memory monitor and alarm, and uses Nico François'
  127. reqtools.library (see the docs on how to set this up).
  128.  
  129.  
  130.         Yours,
  131.  
  132.  
  133.  
  134.  
  135.                     Jim Finnis
  136.